export const columns = [
  {
    title: '序号',
    dataIndex: 'index',
    key: 'index'
  },
  {
    title: '订单号',
    dataIndex: 'orderNum',
    key: 'orderNum'
  },
  {
    title: '用户ID',
    dataIndex: 'userId',
    key: 'userId'
  },
  {
    title: '总金额',
    dataIndex: 'totalAmount',
    key: 'totalAmount',
    sorter: (a, b) => a.totalAmount - b.totalAmount
  },
  {
    title: '订单状态',
    dataIndex: 'orderStatus',
    key: 'orderStatus',
    sorter: (a, b) => a.orderStatus - b.orderStatus
  },
  {
    title: '支付方式',
    dataIndex: 'payType',
    key: 'payType',
  },
  {
    title: '支付时间',
    dataIndex: 'paymentTime',
    key: 'paymentTime',
    sorter: (a, b) => new Date(a.paymentTime).getTime() - new Date(b.paymentTime).getTime(),
  },
  {
    title: '备注',
    dataIndex: 'remark',
    key: 'remark'
  },
  {
    title: '操作',
    dataIndex: 'action',
    key: 'action'
  }
]

export const orderStatusMap = {
  1: '待付款',
  2: '待发货',
  3: '待收货',
  4: '已完成',
  5: '已关闭',
  6: '退款中',
  7: '退款完成',
  8: '已评价',
}

export const orderStatusColorMap = {
  1: '#f50',
  2: '#2db7f5',
  3: '#108ee9',
  4: '#87d068',
  5: '#a49e96',
  6: '#b97a5e',
  7: '#a49e96',
  8: '#73e273',
}

export const orderStatusFilter = [
  {
    label: '全部',
    value: ''
  },
  {
    label: '待付款',
    value: 1
  },
  {
    label: '待发货',
    value: 2
  },
  {
    label: '待收货',
    value: 3
  },
  {
    label: '已完成',
    value: 4
  },
  {
    label: '已关闭',
    value: 5
  },
  {
    label: '退款中',
    value: 6
  },
  {
    label: '退款完成',
    value: 7
  },
  {
    label: '已评价',
    value: 8
  }
]

export const orderPayTypeMap = {
  2: '货到付款',
  0: '微信支付',
  1: '支付宝',
  3: '其他'
}

export const orderPlyWayMap = [
  {
    label: '全部',
    value: ''
  },
  {
    label: '微信支付',
    value: 0
  },
  {
    label: '支付宝',
    value: 1
  },
  {
    label: '货到付款',
    value: 2
  },
  {
    label: '其他',
    value: 3
  }
]
